package dht.statistics;

public class ServerStatistics {
	public int serverId;
	public int readCount;
	public int writeCount;
	public int updateCount;
	public int updateRejectCount;
	public int clientUpdateCount;
	public double idleTime;
	public double processTime;
	public double lastActiveTime;
	public int cpuReportCount;

	public ServerStatistics(int serverId) {
		this.serverId = serverId;
		this.readCount = 0;
		this.writeCount = 0;
		this.updateCount = 0;
		this.updateRejectCount = 0;
		this.clientUpdateCount = 0;
		this.idleTime = 0.0;
		this.processTime = 0.0;
		this.lastActiveTime = 0.0;
		this.cpuReportCount = 0;
	}

	public String toString() {
		return "###ServerStatistics begin###\nserverId: " + serverId
				+ " readCount: " + readCount + " writeCount: " + writeCount
				+ " updateCount: " + updateCount + " updateRejectCount: "
				+ updateRejectCount + " clientUpdateCount: "
				+ clientUpdateCount + " idleTime: " + idleTime
				+ " processTime: " + processTime + " lastActiveTime: "
				+ lastActiveTime + " cpuReportCount: " + cpuReportCount
				+ "\n###ServerStatistics end###\n";
	}
}
